<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:replace="include/css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/ask.css">
    <meta charset="UTF-8">
    <title>问答</title>
</head>
<body>
<th:block th:replace="include/header:: header"/>

<div class="main">
    <div class="left">
        <div class="tag">
            <a href="/ask" th:class="${haveSolved==0?'active':''}">待解决问题</a>
            <a href="/ask?solveType=1" th:class="${haveSolved==1?'active':''}">已解决问题</a>
        </div>
        <div class="left-main">
            <div class="title-item" th:if="${#lists.size(result.list)>0}" th:each="v,l:${result.list}">
                <div class="title">
                    <a th:href="'/ask/'+${v.askId}" th:text="${v.title}"></a>
                    <span class="mark"><i class="icon icon-mark"></i>&nbsp;赏金&nbsp;<th:block
                            th:text="${v.mark}"/></span>
                    <span class="time" th:text="${#temporals.format(v.createTime, 'yyyy-MM-dd HH:mm:ss')}"></span>
                    <span class="answer" th:text="${#strings.defaultString(v.commentCount,0)}+'人回答'"></span>
                    <div class="clear"></div>
                </div>
                <div class="summary" th:text="${v.summary}">
                </div>
            </div>
            <div class="no-data" th:unless="${#lists.size(result.list)>0}">没有帖子，赶紧抢沙发吧</div>
            <div id="page" class="page"></div>
        </div>
    </div>

    <div class="right">
        <div class="count-info">
            <p><span class="day-count" th:text="'今日问题：'+${#strings.defaultString(todayAskCount,0)}"> </span><span
                    th:text="'今日解决：'+${#strings.defaultString(todaySolvedCount,0)}"></span></p>
            <p><span class="day-count" th:text="'所有问题：'+${#strings.defaultString(totalAsk,0)}"></span> <span
                    th:text="'总共解决：'+${#strings.defaultString(totalSolved,'0')}"></span></p>
            <button class="btn btn-info toAsk" id="toAsk">我要提问</button>
        </div>
        <div class="rang">
            <div class="rang-title">
                <span class="rang-bang">封神榜</span>
                <span class="rang-count">采纳数</span>
            </div>
            <div class="rang-list">
                <div class="rang-item" th:if="${#lists.size(topUsers)>0}" th:each="v:${topUsers}">
                    <div class="rang-user"><span class="rang-num rang-num1">1</span><a
                            th:href="'/user/'+${v.userId}" th:text="${v.userName}"></a></div>
                    <span class="rang-item-count" th:text="${v.solveCount}"></span>
                    <div class="clear"></div>
                </div>
                <div class="no-data" th:unless="${#lists.size(topUsers)>0}">没有人被采纳，赶紧抢沙发吧</div>
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>
<th:block th:replace="include/footer:: footer"/>
<th:block th:replace="include/top"/>
<script type="text/javascript" charset="utf-8" src="/static/laypage/laypage.js"></script>
<script th:inline="javascript">
    fzqblog.pageTotal = [[${result.page.pageTotal}]]
</script>
<script type="text/javascript" src="/static/js/ask.js"></script>
</body>
</html>